<?php
defined('ROOT') or die('No direct script access.');
echo "<!DOCTYPE html> <html>";
include_once "header.php";
?>
<form id="frm_db_params">
    <table>
        <tr>
            <td>
                <span>Строка соединения</span>
            </td>
            <td>
                <input type="text" id="connection_string" name="connection_string">
            </td>
        </tr>
        <tr>
            <td>
                <span>Логин</span>
            </td>
            <td>
                <input type="text" id="login" name="login">
            </td>
        </tr>
        <tr>
            <td>
                <span>Пароль</span>
            </td>
            <td>
                <input type="text" id="password" name="password">
            </td>
        </tr>
        <tr>
            <td>
                <span>Префикс БД</span>
            </td>
            <td>
                <input type="text" id="db_prefix" name="db_prefix">
            </td>
        </tr>
        <tr>
            <td>
                <span>Имя таблицы</span>
            </td>
            <td>
                <input type="text" id="table_name" name="table_name">
            </td>
        </tr>
        <tr>
            <td>
                Каталог приложения
            </td>
            <td>
                <input type="text" id="app_path" name="app_path">
            </td>
        </tr>
        <tr>
            <td>
                Папка шаблона
            </td>
            <td>
                <input type="text" id="template_folder" name="template_folder">
            </td>
        </tr>


    </table>
    <button type=submit class=btn>Получить данные</button>
</form>
<div id="content"></div>
<script>
    $('#frm_db_params').submit(function () {
        $.post('/main/tableinfo', $('#frm_db_params').serialize(),
            function (data) {
                $('#content').html(data);
            });
        return false;
    });
</script>

